<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="keywords" content="dromara.org" />
	<meta name="description" content="dromara.org" />
	<!-- 网页标签标题 -->
	<title>dromara(Open source organization)</title>
	<link rel="shortcut icon" href="/website/img/docsite.ico"/>
	<link rel="stylesheet" href="/website/build/documentation.css" />
</head>
<body>
	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/website/en-us/index.html"><img class="logo" src="/website/img/dromara.png"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">中</span><div class="header-menu"><img class="header-menu-toggle" src="/website/img/system/menu_gray.png"/><ul><li class="menu-item menu-item-normal"><a href="/website/en-us/index.html" target="_self">Home</a><div class="sub-menu"><ul></ul></div></li><li class="menu-item menu-item-normal menu-item-normal-active"><a href="#">Document</a><div class="sub-menu"><ul><li><a href="/website/en-us/docs/soul/soul.html" target="_self">Soul</a></li><li><a href="/website/en-us/docs/hmily/index.html" target="_self">Hmily</a></li></ul></div></li><li class="menu-item menu-item-normal"><a href="/website/en-us/blog/index.html" target="_self">Blog</a><div class="sub-menu"><ul></ul></div></li><li class="menu-item menu-item-normal"><a href="/website/en-us/community/index.html" target="_self">Community</a><div class="sub-menu"><ul></ul></div></li></ul></div></div></header><section class="content-section"><div class="sidemenu" id="menu"><div class="sidemenu-toggle"><img src="https://img.alicdn.com/tfs/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"/></div><ul><li class="menu-item menu-item-level-1"><span>Soul</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/soul.html" target="_self">Home  </a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/team.html" target="_self">Team</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/db.html" target="_self">Database Design</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/config.html" target="_self">Config</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/dataSync.html" target="_self">DataSync</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/metaData.html" target="_self">MetaData</a></li><li style="height:792px;overflow:hidden" class="menu-item menu-item-level-2"><span>User Document<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/setup.html" target="_self">Set up</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/soul-dict.html" target="_self">Dictionary management</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-handle.html" target="_self">Plugin handle explanation</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-http.html" target="_self">Http proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-dubbo.html" target="_self">Dubbo proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-springcloud.html" target="_self">Spring cloud proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-sofa.html" target="_self">Sofa rpc proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/selector.html" target="_self">Selector and Rule</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-dataSync.html" target="_self">Use data sync</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-divide.html" target="_self">Divide Plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-dubbo.html" target="_self">Dubbo plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-springcloud.html" target="_self">Spring cloud plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-sofa.html" target="_self">Sofa plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-rateLimiter.html" target="_self">RateLimiter plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-hystrix.html" target="_self">Hystrix plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-sentinel.html" target="_self">Sentinel plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-monitor.html" target="_self">Monitor plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-waf.html" target="_self">Waf plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-sign.html" target="_self">Sign plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-rewrite.html" target="_self">Rewrite plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-websocket.html" target="_self">Websocket plugin</a></li></ul></li><li style="height:360px;overflow:hidden" class="menu-item menu-item-level-2"><span>Developer Guide<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-filter.html" target="_self">Custom filter </a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-plugin.html" target="_self">Custom plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-file.html" target="_self">File and Image</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-iphost.html" target="_self">Custom parsing IP and Host</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-result.html" target="_self">Custom result</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-sign.html" target="_self">Custom sign algorithm</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-client.html" target="_self">Developer soul client</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-thread.html" target="_self">Thread</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-netty.html" target="_self">Soul optimize</a></li></ul></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>Community<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/contributor.html" target="_self">Contributor</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/committer.html" target="_self">Committer</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/code-conduct.html" target="_self">Code conduct</a></li></ul></li></ul></li></ul></div><div class="doc-content markdown-body" id="doc-body"><h3>Configuration Detail：</h3>
<ul>
<li>
<p>File Name: <code>hmily.yml</code>。</p>
</li>
<li>
<p>Path： The default path is the <code>resource</code> directory of the project, which can be specified by <code>-Dhmily.conf</code>, and you can also put the configuration in <code>user.dir</code> directory.
Priority: <code>-Dhmily.conf</code> &gt; <code>user.dir</code> &gt; <code>resource</code></p>
</li>
</ul>
<pre><code class="language-yaml"><span class="hljs-attr">hmily:</span>
  <span class="hljs-attr">server:</span>
    <span class="hljs-attr">configMode:</span> <span class="hljs-string">local</span>
    <span class="hljs-attr">appName:</span> <span class="hljs-string">xiaoyu</span>  
  <span class="hljs-comment">#  The following configuration will be read when server.configMode equals local</span>
  <span class="hljs-attr">config:</span>
    <span class="hljs-attr">appName:</span> <span class="hljs-string">xiaoyu</span>
    <span class="hljs-attr">serializer:</span> <span class="hljs-string">kryo</span>
    <span class="hljs-attr">contextTransmittalMode:</span> <span class="hljs-string">threadLocal</span>
    <span class="hljs-attr">scheduledThreadMax:</span> <span class="hljs-number">16</span>
    <span class="hljs-attr">scheduledRecoveryDelay:</span> <span class="hljs-number">60</span>
    <span class="hljs-attr">scheduledCleanDelay:</span> <span class="hljs-number">60</span>
    <span class="hljs-attr">scheduledPhyDeletedDelay:</span> <span class="hljs-number">600</span>
    <span class="hljs-attr">scheduledInitDelay:</span> <span class="hljs-number">30</span>
    <span class="hljs-attr">recoverDelayTime:</span> <span class="hljs-number">60</span>
    <span class="hljs-attr">cleanDelayTime:</span> <span class="hljs-number">180</span>
    <span class="hljs-attr">limit:</span> <span class="hljs-number">200</span>
    <span class="hljs-attr">retryMax:</span> <span class="hljs-number">10</span>
    <span class="hljs-attr">bufferSize:</span> <span class="hljs-number">8192</span>
    <span class="hljs-attr">consumerThreads:</span> <span class="hljs-number">16</span>
    <span class="hljs-attr">asyncRepository:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">autoSql:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">phyDeleted:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">storeDays:</span> <span class="hljs-number">3</span>
    <span class="hljs-attr">repository:</span> <span class="hljs-string">mysql</span>

<span class="hljs-attr">repository:</span>
  <span class="hljs-attr">database:</span>
    <span class="hljs-attr">driverClassName:</span> <span class="hljs-string">com.mysql.jdbc.Driver</span>
    <span class="hljs-attr">url :</span>
    <span class="hljs-attr">username:</span>
    <span class="hljs-attr">password:</span>
    <span class="hljs-attr">maxActive:</span> <span class="hljs-number">20</span>
    <span class="hljs-attr">minIdle:</span> <span class="hljs-number">10</span>
    <span class="hljs-attr">connectionTimeout:</span> <span class="hljs-number">30000</span>
    <span class="hljs-attr">idleTimeout:</span> <span class="hljs-number">600000</span>
    <span class="hljs-attr">maxLifetime:</span> <span class="hljs-number">1800000</span>
  <span class="hljs-attr">file:</span>
    <span class="hljs-attr">path:</span>
    <span class="hljs-attr">prefix:</span> <span class="hljs-string">/hmily</span>
  <span class="hljs-attr">mongo:</span>
    <span class="hljs-attr">databaseName:</span>
    <span class="hljs-attr">url:</span>
    <span class="hljs-attr">userName:</span>
    <span class="hljs-attr">password:</span>
  <span class="hljs-attr">zookeeper:</span>
    <span class="hljs-attr">host:</span> <span class="hljs-string">localhost:2181</span>
    <span class="hljs-attr">sessionTimeOut:</span> <span class="hljs-number">1000</span>
    <span class="hljs-attr">rootPath:</span> <span class="hljs-string">/hmily</span>
  <span class="hljs-attr">redis:</span>
    <span class="hljs-attr">cluster:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">sentinel:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">clusterUrl:</span>
    <span class="hljs-attr">sentinelUrl:</span>
    <span class="hljs-attr">masterName:</span>
    <span class="hljs-attr">hostName:</span>
    <span class="hljs-attr">port:</span>
    <span class="hljs-attr">password:</span>
    <span class="hljs-attr">maxTotal:</span> <span class="hljs-number">8</span>
    <span class="hljs-attr">maxIdle:</span> <span class="hljs-number">8</span>
    <span class="hljs-attr">minIdle:</span> <span class="hljs-number">2</span>
    <span class="hljs-attr">maxWaitMillis:</span> <span class="hljs-number">-1</span>
    <span class="hljs-attr">minEvictableIdleTimeMillis:</span> <span class="hljs-number">1800000</span>
    <span class="hljs-attr">softMinEvictableIdleTimeMillis:</span> <span class="hljs-number">1800000</span>
    <span class="hljs-attr">numTestsPerEvictionRun:</span> <span class="hljs-number">3</span>
    <span class="hljs-attr">testOnCreate:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">testOnBorrow:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">testOnReturn:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">testWhileIdle:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">timeBetweenEvictionRunsMillis:</span> <span class="hljs-number">-1</span>
    <span class="hljs-attr">blockWhenExhausted:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">timeOut:</span> <span class="hljs-number">1000</span>

<span class="hljs-attr">metrics:</span>
  <span class="hljs-attr">metricsName:</span> <span class="hljs-string">prometheus</span>
  <span class="hljs-attr">host:</span>
  <span class="hljs-attr">port:</span> <span class="hljs-number">9091</span>
  <span class="hljs-attr">async:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">threadCount :</span> <span class="hljs-number">16</span>
  <span class="hljs-attr">jmxConfig:</span>
</code></pre>
<h3>Hmily.server Configuration</h3>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">configMode</td>
<td style="text-align:left">String</td>
<td style="text-align:center">local</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Configuration mode supports local,zookeeper,nacos, and apollo now. If configuration is local, it will read the configuration from yml file;If the configuration is other modes, it will get the configuration form configuration centre.</td>
</tr>
<tr>
<td style="text-align:left">appName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Application name. AppName will be overwritten if also configured in hmilyConfig.</td>
</tr>
</tbody>
</table>
<h3>Hmily.config Configuration</h3>
<ul>
<li>This is the core configuration of the whole framework</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">appName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">It filled in your Microservices application's name generally, but don't repeat it</td>
</tr>
<tr>
<td style="text-align:left">serializer</td>
<td style="text-align:left">String</td>
<td style="text-align:center">kryo</td>
<td style="text-align:center">no</td>
<td style="text-align:left">This is mode of serializing the specified transaction log，and currently supports filling in <code>kryo</code>, <code>hessian</code>, <code>jdk</code>, <code>jdk</code>, <code>protostuff</code></td>
</tr>
<tr>
<td style="text-align:left">contextTransmittalMode</td>
<td style="text-align:left">String</td>
<td style="text-align:center">threadLocal</td>
<td style="text-align:center">no</td>
<td style="text-align:left">This is the mode of transaction context transfer, and currently supports filling in <code>threadLocal</code>, <code>transmittable</code> (Cross-thread mode)</td>
</tr>
<tr>
<td style="text-align:left">scheduledThreadMax</td>
<td style="text-align:left">int</td>
<td style="text-align:center">CPU * 2</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum number of scheduled threads</td>
</tr>
<tr>
<td style="text-align:left">scheduledRecoveryDelay</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">60</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Scheduling cycle of auto recovering transaction log</td>
</tr>
<tr>
<td style="text-align:left">scheduledCleanDelay</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">60</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Scheduling cycle of cleaning transaction log</td>
</tr>
<tr>
<td style="text-align:left">scheduledPhyDeletedDelay</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">60</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Scheduling cycle of deleting transaction log</td>
</tr>
<tr>
<td style="text-align:left">scheduledInitDelay</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">30</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Delay time of starting scheduled task</td>
</tr>
<tr>
<td style="text-align:left">recoverDelayTime</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">60</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Delay time of recovering transaction log</td>
</tr>
<tr>
<td style="text-align:left">cleanDelayTime</td>
<td style="text-align:left">int(unit:sec)</td>
<td style="text-align:center">60</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Delay time of cleaning  transaction log</td>
</tr>
<tr>
<td style="text-align:left">limit</td>
<td style="text-align:left">int</td>
<td style="text-align:center">100</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Transaction log row size</td>
</tr>
<tr>
<td style="text-align:left">retryMax</td>
<td style="text-align:left">int</td>
<td style="text-align:center">10</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum number of retries</td>
</tr>
<tr>
<td style="text-align:left">bufferSize</td>
<td style="text-align:left">int</td>
<td style="text-align:center">4096 * 2 * 2</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Buffer size of disruptor</td>
</tr>
<tr>
<td style="text-align:left">consumerThreads</td>
<td style="text-align:left">int</td>
<td style="text-align:center">CPU * 2</td>
<td style="text-align:center">no</td>
<td style="text-align:left">The number of consumer thread of disruptor</td>
</tr>
<tr>
<td style="text-align:left">asyncRepository</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Whether to store the transaction log asynchronously or not; If set to false, it will be synchronous</td>
</tr>
<tr>
<td style="text-align:left">autoSql</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Whether automatically execute the SQL statement to create databases and tables （If they have been created, you can set false）</td>
</tr>
<tr>
<td style="text-align:left">phyDeleted</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">no</td>
<td style="text-align:left">In running time，whether delete logs physically. Setting false will change the state of log.</td>
</tr>
<tr>
<td style="text-align:left">storeDays</td>
<td style="text-align:left">int(unit:day)</td>
<td style="text-align:center">3</td>
<td style="text-align:center">no</td>
<td style="text-align:left">If phyDeleted set false，storeDays means days of storage</td>
</tr>
<tr>
<td style="text-align:left">repository</td>
<td style="text-align:left">String</td>
<td style="text-align:center">mysql</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">This is specified storage mode of transaction log，and currently supports filling in <code>mysql</code>, <code>oracle</code>, <code>postgresql</code>, <code>sqlserver</code>, <code>mongo</code>, <code>redis</code>, <code>file</code></td>
</tr>
</tbody>
</table>
<h3>Repository Configuration</h3>
<p>Repository is a configuration for storing transaction logs by Hmily, and currently supports: database(mysql, oracle, postgresql, sqlserver), file(dev, test, prod), mongodb, zookeeper, redis.</p>
<ul>
<li>database configuration(The default pool is hikari):</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">driverClassName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">com.mysql.jdbc.Driver</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">driver name of your connection</td>
</tr>
<tr>
<td style="text-align:left">url</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">url connection of your database</td>
</tr>
<tr>
<td style="text-align:left">username</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">username of your database</td>
</tr>
<tr>
<td style="text-align:left">password</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">password of your database</td>
</tr>
<tr>
<td style="text-align:left">maxActive</td>
<td style="text-align:left">int</td>
<td style="text-align:center">20</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum active number of connections of pool</td>
</tr>
<tr>
<td style="text-align:left">minIdle</td>
<td style="text-align:left">int</td>
<td style="text-align:center">10</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Minimum idle number of connections of pool</td>
</tr>
<tr>
<td style="text-align:left">connectionTimeout</td>
<td style="text-align:left">long</td>
<td style="text-align:center">30000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">A timeout of connecting to your database</td>
</tr>
<tr>
<td style="text-align:left">idleTimeout</td>
<td style="text-align:left">long</td>
<td style="text-align:center">60000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum time(ms) of a idle connection，it will be retired when timeout，default:10 minutes</td>
</tr>
<tr>
<td style="text-align:left">maxLifetime</td>
<td style="text-align:left">long</td>
<td style="text-align:center">1800000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum lifespan of a connection(ms)，it will be retired when it is timeout and don't be used，default:30 minutes; Suggest less 30 sec than timeout of database, please refer to MySQL wait_timeout parameter（show variables like '%timeout%';</td>
</tr>
<tr>
<td style="text-align:left">idleTimeout</td>
<td style="text-align:left">long</td>
<td style="text-align:center">60000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum time(ms) of timeout ，it will be retired when timeout，default:10 minutes</td>
</tr>
<tr>
<td style="text-align:left">dataSourcePropertyMap</td>
<td style="text-align:left">Map&lt;String,Object&gt;</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">The other property configuration of hikari</td>
</tr>
</tbody>
</table>
<ul>
<li>mongo configuration:</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">databaseName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">mongo name</td>
</tr>
<tr>
<td style="text-align:left">url</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">mongo url</td>
</tr>
<tr>
<td style="text-align:left">userName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">mongo username</td>
</tr>
<tr>
<td style="text-align:left">password</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">mongo password</td>
</tr>
</tbody>
</table>
<ul>
<li>file configuration:</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">path</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">the storage path to the file</td>
</tr>
<tr>
<td style="text-align:left">prefix</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">prefix of file storage</td>
</tr>
</tbody>
</table>
<ul>
<li>zookeeper configuration:</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">host</td>
<td style="text-align:left">String</td>
<td style="text-align:center">localhost:2181</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">zookeeper service ip and port</td>
</tr>
<tr>
<td style="text-align:left">sessionTimeOut</td>
<td style="text-align:left">int(ms)</td>
<td style="text-align:center">1000</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">the timeout of session</td>
</tr>
<tr>
<td style="text-align:left">rootPath</td>
<td style="text-align:left">String</td>
<td style="text-align:center">/hmily</td>
<td style="text-align:center">no</td>
<td style="text-align:left">root storage path</td>
</tr>
</tbody>
</table>
<ul>
<li>redis configuration:</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">cluster</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Is it cluster?</td>
</tr>
<tr>
<td style="text-align:left">sentinel</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Is it sentinel mode?</td>
</tr>
<tr>
<td style="text-align:left">clusterUrl</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Cluster url，multiple nodes use <code>;</code> to separate</td>
</tr>
<tr>
<td style="text-align:left">sentinelUrl</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Sentinel url，multiple nodes use <code>;</code> to separate</td>
</tr>
<tr>
<td style="text-align:left">masterName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Main node name, and it can be empty if no setting</td>
</tr>
<tr>
<td style="text-align:left">hostName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Redis host in redis standalone mode</td>
</tr>
<tr>
<td style="text-align:left">port</td>
<td style="text-align:left">int</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Redis port in standalone mode</td>
</tr>
<tr>
<td style="text-align:left">password</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Password of redis service</td>
</tr>
<tr>
<td style="text-align:left">maxTotal</td>
<td style="text-align:left">int</td>
<td style="text-align:center">8</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum number of connections</td>
</tr>
<tr>
<td style="text-align:left">maxIdle</td>
<td style="text-align:left">int</td>
<td style="text-align:center">8</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum number of idle connections</td>
</tr>
<tr>
<td style="text-align:left">minIdle</td>
<td style="text-align:left">int</td>
<td style="text-align:center">0</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Minimum number of idle connections</td>
</tr>
<tr>
<td style="text-align:left">maxWaitMillis</td>
<td style="text-align:left">int</td>
<td style="text-align:center">-1</td>
<td style="text-align:center">no</td>
<td style="text-align:left">When connections of the resource pool is exhausted, the maximum wait time of caller (ms); -1：never timeout, don't suggest setting it</td>
</tr>
<tr>
<td style="text-align:left">minEvictableIdleTimeMillis</td>
<td style="text-align:left">int</td>
<td style="text-align:center">1800000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Minimum idle time of resource pool (ms)，idle resource will be removed when reaching to the value;The default is 1000*60 *30 = 30 minutes</td>
</tr>
<tr>
<td style="text-align:left">softMinEvictableIdleTimeMillis</td>
<td style="text-align:left">int</td>
<td style="text-align:center">1800000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">How long evicted idle object, when idle time &gt; the value and idle connection numbers &gt; maximum idle connections, it will be evicted directly, no longer based on MinEvictableIdleTimeMillis to judge  (Default eviction policy)</td>
</tr>
<tr>
<td style="text-align:left">numTestsPerEvictionRun</td>
<td style="text-align:left">int</td>
<td style="text-align:center">3</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Maximum number of evictions at each eviction check; If it is negative, it is : 1/abs(n), the default is 3</td>
</tr>
<tr>
<td style="text-align:left">timeBetweenEvictionRunsMillis</td>
<td style="text-align:left">int</td>
<td style="text-align:center">-1</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Time interval of eviction scan (milliseconds) If it is negative, the eviction thread will not run, and the default is -1</td>
</tr>
<tr>
<td style="text-align:left">timeOut</td>
<td style="text-align:left">int</td>
<td style="text-align:center">1000</td>
<td style="text-align:center">no</td>
<td style="text-align:left">timeout</td>
</tr>
<tr>
<td style="text-align:left">testOnCreate</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Is the validity verified when obtaining the connection</td>
</tr>
<tr>
<td style="text-align:left">testOnBorrow</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Whether process alidate operation in advance when borrow a jedis instance; If it is true，the returned jedis instances are all avaiable</td>
</tr>
<tr>
<td style="text-align:left">testOnReturn</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Whether process validate operation in advance before return to pool</td>
</tr>
<tr>
<td style="text-align:left">testWhileIdle</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">no</td>
<td style="text-align:left">If it is true，it means there is a idle object evitor thread that is scanning idle object; If validate fail，the object will be dropped from pool;This item only take effect when timeBetweenEvictionRunsMillis is greater than 0</td>
</tr>
<tr>
<td style="text-align:left">blockWhenExhausted</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Whether block the connection when resource is exhausted, false will throw exception, true will block until timeout</td>
</tr>
</tbody>
</table>
<h3>Metrics Configuration</h3>
<p>Metrics will record call numbers, runtime, transaction submission and failure in the runtime of the hmily framework，only supports <code>prometheus</code> currently.</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:left">Type</th>
<th style="text-align:center">Default</th>
<th style="text-align:center">Required</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">metricsName</td>
<td style="text-align:left">String</td>
<td style="text-align:center">prometheus</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Supported type，only supports prometheus currently</td>
</tr>
<tr>
<td style="text-align:left">host</td>
<td style="text-align:left">String</td>
<td style="text-align:center">localhost</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Exposed http services host;</td>
</tr>
<tr>
<td style="text-align:left">port</td>
<td style="text-align:left">int</td>
<td style="text-align:center">9091</td>
<td style="text-align:center">yes</td>
<td style="text-align:left">Exposed http services port;</td>
</tr>
<tr>
<td style="text-align:left">async</td>
<td style="text-align:left">boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Asynchronous mode record or not</td>
</tr>
<tr>
<td style="text-align:left">threadCount</td>
<td style="text-align:left">int</td>
<td style="text-align:center">2 * cpu</td>
<td style="text-align:center">no</td>
<td style="text-align:left">Number of threads in asynchronous mode</td>
</tr>
<tr>
<td style="text-align:left">jmxConfig</td>
<td style="text-align:left">String</td>
<td style="text-align:center">null</td>
<td style="text-align:center">no</td>
<td style="text-align:left">jmxConfig configuration，is a json format，and please refer to prometheus official website for details</td>
</tr>
</tbody>
</table>
</div></section><footer class="footer-container"><div class="footer-body"><img src="/website/img/dromara.png"/><div class="cols-container"><div class="col col-12"><h3>Disclaimer</h3><p>Any unit or individual reprint all relevant information of this website, please indicate the source.</p></div><div class="col col-6"><dl><dt>Document</dt><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Overview </a></dd><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Stat up</a></dd><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Developer Guide</a></dd></dl></div><div class="col col-6"><dl><dt>Resource</dt><dd><a href="/website/en-us/blog/index.html" target="_self">Blog</a></dd><dd><a href="/website/en-us/community/index.html" target="_self">Community</a></dd></dl></div></div><div class="copyright"><span>Copyright ©2020 xiaoyu@apache.org by xiaoyu</span></div></div></footer></div></div>
	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
	<script>
		window.rootPath = '/website';
  </script>
	<script src="/website/build/documentation.js"></script>
</body>
</html>